Optimal. Leaf size=370 \[ -\frac {b \tanh ^{-1}(a+b x)}{\left (1-a^2\right ) x}-\frac {\tanh ^{-1}(a+b x)^2}{2 x^2}+\frac {b^2 \log (x)}{\left (1-a^2\right )^2}+\frac {b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{2 (1-a)^2}-\frac {b^2 \log (1-a-b x)}{2 (1-a)^2 (1+a)}-\frac {b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1+a+b x}\right )}{2 (1+a)^2}-\frac {2 a b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1+a+b x}\right )}{\left (1-a^2\right )^2}+\frac {2 a b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2 b x}{(1-a) (1+a+b x)}\right )}{\left (1-a^2\right )^2}-\frac {b^2 \log (1+a+b x)}{2 (1-a) (1+a)^2}+\frac {b^2 \text {PolyLog}\left (2,-\frac {1+a+b x}{1-a-b x}\right )}{4 (1-a)^2}+\frac {b^2 \text {PolyLog}\left (2,1-\frac {2}{1+a+b x}\right )}{4 (1+a)^2}+\frac {a b^2 \text {PolyLog}\left (2,1-\frac {2}{1+a+b x}\right )}{\left (1-a^2\right )^2}-\frac {a b^2 \text {PolyLog}\left (2,1-\frac {2 b x}{(1-a) (1+a+b x)}\right )}{\left (1-a^2\right )^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.59, antiderivative size = 370, normalized size of antiderivative = 1.00, number of steps
used = 21, number of rules used = 16, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.333, Rules used = {6244,
378, 724, 815, 6873, 6256, 6857, 6063, 720, 31, 647, 6057, 2449, 2352, 2497, 6055}
\begin {gather*} \frac {a b^2 \text {Li}_2\left (1-\frac {2}{a+b x+1}\right )}{\left (1-a^2\right )^2}-\frac {a b^2 \text {Li}_2\left (1-\frac {2 b x}{(1-a) (a+b x+1)}\right )}{\left (1-a^2\right )^2}+\frac {b^2 \log (x)}{\left (1-a^2\right )^2}-\frac {2 a b^2 \log \left (\frac {2}{a+b x+1}\right ) \tanh ^{-1}(a+b x)}{\left (1-a^2\right )^2}+\frac {2 a b^2 \log \left (\frac {2 b x}{(1-a) (a+b x+1)}\right ) \tanh ^{-1}(a+b x)}{\left (1-a^2\right )^2}-\frac {b \tanh ^{-1}(a+b x)}{\left (1-a^2\right ) x}+\frac {b^2 \text {Li}_2\left (-\frac {a+b x+1}{-a-b x+1}\right )}{4 (1-a)^2}+\frac {b^2 \text {Li}_2\left (1-\frac {2}{a+b x+1}\right )}{4 (a+1)^2}-\frac {b^2 \log (-a-b x+1)}{2 (1-a)^2 (a+1)}-\frac {b^2 \log (a+b x+1)}{2 (1-a) (a+1)^2}+\frac {b^2 \log \left (\frac {2}{-a-b x+1}\right ) \tanh ^{-1}(a+b x)}{2 (1-a)^2}-\frac {b^2 \log \left (\frac {2}{a+b x+1}\right ) \tanh ^{-1}(a+b x)}{2 (a+1)^2}-\frac {\tanh ^{-1}(a+b x)^2}{2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 378
Rule 647
Rule 720
Rule 724
Rule 815
Rule 2352
Rule 2449
Rule 2497
Rule 6055
Rule 6057
Rule 6063
Rule 6244
Rule 6256
Rule 6857
Rule 6873
Rubi steps
\begin {align*} \int \frac {\tanh ^{-1}(a+b x)^2}{x^3} \, dx &=-\frac {\tanh ^{-1}(a+b x)^2}{2 x^2}+b \int \frac {\tanh ^{-1}(a+b x)}{x^2 \left (1-(a+b x)^2\right )} \, dx\\ &=-\frac {\tanh ^{-1}(a+b x)^2}{2 x^2}+b \int \frac {\tanh ^{-1}(a+b x)}{x^2 \left (1-a^2-2 a b x-b^2 x^2\right )} \, dx\\ &=-\frac {\tanh ^{-1}(a+b x)^2}{2 x^2}+\text {Subst}\left (\int \frac {\tanh ^{-1}(x)}{\left (-\frac {a}{b}+\frac {x}{b}\right )^2 \left (1-x^2\right )} \, dx,x,a+b x\right )\\ &=-\frac {\tanh ^{-1}(a+b x)^2}{2 x^2}+\text {Subst}\left (\int \left (-\frac {b^2 \tanh ^{-1}(x)}{\left (-1+a^2\right ) (a-x)^2}-\frac {2 a b^2 \tanh ^{-1}(x)}{\left (-1+a^2\right )^2 (a-x)}-\frac {b^2 \tanh ^{-1}(x)}{2 (-1+a)^2 (-1+x)}+\frac {b^2 \tanh ^{-1}(x)}{2 (1+a)^2 (1+x)}\right ) \, dx,x,a+b x\right )\\ &=-\frac {\tanh ^{-1}(a+b x)^2}{2 x^2}-\frac {b^2 \text {Subst}\left (\int \frac {\tanh ^{-1}(x)}{-1+x} \, dx,x,a+b x\right )}{2 (1-a)^2}+\frac {b^2 \text {Subst}\left (\int \frac {\tanh ^{-1}(x)}{1+x} \, dx,x,a+b x\right )}{2 (1+a)^2}-\frac {\left (2 a b^2\right ) \text {Subst}\left (\int \frac {\tanh ^{-1}(x)}{a-x} \, dx,x,a+b x\right )}{\left (1-a^2\right )^2}+\frac {b^2 \text {Subst}\left (\int \frac {\tanh ^{-1}(x)}{(a-x)^2} \, dx,x,a+b x\right )}{1-a^2}\\ &=-\frac {b \tanh ^{-1}(a+b x)}{\left (1-a^2\right ) x}-\frac {\tanh ^{-1}(a+b x)^2}{2 x^2}+\frac {b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{2 (1-a)^2}-\frac {b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1+a+b x}\right )}{2 (1+a)^2}-\frac {2 a b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1+a+b x}\right )}{\left (1-a^2\right )^2}+\frac {2 a b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2 b x}{(1-a) (1+a+b x)}\right )}{\left (1-a^2\right )^2}-\frac {b^2 \text {Subst}\left (\int \frac {\log \left (\frac {2}{1-x}\right )}{1-x^2} \, dx,x,a+b x\right )}{2 (1-a)^2}+\frac {b^2 \text {Subst}\left (\int \frac {\log \left (\frac {2}{1+x}\right )}{1-x^2} \, dx,x,a+b x\right )}{2 (1+a)^2}+\frac {\left (2 a b^2\right ) \text {Subst}\left (\int \frac {\log \left (\frac {2}{1+x}\right )}{1-x^2} \, dx,x,a+b x\right )}{\left (1-a^2\right )^2}-\frac {\left (2 a b^2\right ) \text {Subst}\left (\int \frac {\log \left (\frac {2 (a-x)}{(-1+a) (1+x)}\right )}{1-x^2} \, dx,x,a+b x\right )}{\left (1-a^2\right )^2}-\frac {b^2 \text {Subst}\left (\int \frac {1}{(a-x) \left (1-x^2\right )} \, dx,x,a+b x\right )}{1-a^2}\\ &=-\frac {b \tanh ^{-1}(a+b x)}{\left (1-a^2\right ) x}-\frac {\tanh ^{-1}(a+b x)^2}{2 x^2}+\frac {b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{2 (1-a)^2}-\frac {b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1+a+b x}\right )}{2 (1+a)^2}-\frac {2 a b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1+a+b x}\right )}{\left (1-a^2\right )^2}+\frac {2 a b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2 b x}{(1-a) (1+a+b x)}\right )}{\left (1-a^2\right )^2}-\frac {a b^2 \text {Li}_2\left (1-\frac {2 b x}{(1-a) (1+a+b x)}\right )}{\left (1-a^2\right )^2}+\frac {b^2 \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-a-b x}\right )}{2 (1-a)^2}+\frac {b^2 \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+a+b x}\right )}{2 (1+a)^2}-\frac {b^2 \text {Subst}\left (\int \frac {1}{a-x} \, dx,x,a+b x\right )}{\left (1-a^2\right )^2}-\frac {b^2 \text {Subst}\left (\int \frac {-a-x}{1-x^2} \, dx,x,a+b x\right )}{\left (1-a^2\right )^2}+\frac {\left (2 a b^2\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+a+b x}\right )}{\left (1-a^2\right )^2}\\ &=-\frac {b \tanh ^{-1}(a+b x)}{\left (1-a^2\right ) x}-\frac {\tanh ^{-1}(a+b x)^2}{2 x^2}+\frac {b^2 \log (x)}{\left (1-a^2\right )^2}+\frac {b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{2 (1-a)^2}-\frac {b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1+a+b x}\right )}{2 (1+a)^2}-\frac {2 a b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1+a+b x}\right )}{\left (1-a^2\right )^2}+\frac {2 a b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2 b x}{(1-a) (1+a+b x)}\right )}{\left (1-a^2\right )^2}+\frac {b^2 \text {Li}_2\left (1-\frac {2}{1-a-b x}\right )}{4 (1-a)^2}+\frac {b^2 \text {Li}_2\left (1-\frac {2}{1+a+b x}\right )}{4 (1+a)^2}+\frac {a b^2 \text {Li}_2\left (1-\frac {2}{1+a+b x}\right )}{\left (1-a^2\right )^2}-\frac {a b^2 \text {Li}_2\left (1-\frac {2 b x}{(1-a) (1+a+b x)}\right )}{\left (1-a^2\right )^2}+\frac {b^2 \text {Subst}\left (\int \frac {1}{-1-x} \, dx,x,a+b x\right )}{2 (1-a) (1+a)^2}+\frac {b^2 \text {Subst}\left (\int \frac {1}{1-x} \, dx,x,a+b x\right )}{2 (1-a)^2 (1+a)}\\ &=-\frac {b \tanh ^{-1}(a+b x)}{\left (1-a^2\right ) x}-\frac {\tanh ^{-1}(a+b x)^2}{2 x^2}+\frac {b^2 \log (x)}{\left (1-a^2\right )^2}+\frac {b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{2 (1-a)^2}-\frac {b^2 \log (1-a-b x)}{2 (1-a)^2 (1+a)}-\frac {b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1+a+b x}\right )}{2 (1+a)^2}-\frac {2 a b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2}{1+a+b x}\right )}{\left (1-a^2\right )^2}+\frac {2 a b^2 \tanh ^{-1}(a+b x) \log \left (\frac {2 b x}{(1-a) (1+a+b x)}\right )}{\left (1-a^2\right )^2}-\frac {b^2 \log (1+a+b x)}{2 (1-a) (1+a)^2}+\frac {b^2 \text {Li}_2\left (1-\frac {2}{1-a-b x}\right )}{4 (1-a)^2}+\frac {b^2 \text {Li}_2\left (1-\frac {2}{1+a+b x}\right )}{4 (1+a)^2}+\frac {a b^2 \text {Li}_2\left (1-\frac {2}{1+a+b x}\right )}{\left (1-a^2\right )^2}-\frac {a b^2 \text {Li}_2\left (1-\frac {2 b x}{(1-a) (1+a+b x)}\right )}{\left (1-a^2\right )^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 2.09, size = 271, normalized size = 0.73 \begin {gather*} \frac {-\left (\left (1+a^4-b^2 \left (-1+2 \sqrt {1-a^2} e^{\tanh ^{-1}(a)}\right ) x^2-a^2 \left (2+b^2 x^2\right )\right ) \tanh ^{-1}(a+b x)^2\right )+2 b x \tanh ^{-1}(a+b x) \left (-1+a^2+a b x+i a b \pi x-2 a b x \tanh ^{-1}(a)+2 a b x \log \left (1-e^{2 \tanh ^{-1}(a)-2 \tanh ^{-1}(a+b x)}\right )\right )+2 b^2 x^2 \left (-i a \pi \log \left (1+e^{2 \tanh ^{-1}(a+b x)}\right )+i a \pi \log \left (\frac {1}{\sqrt {1-(a+b x)^2}}\right )+\log \left (-\frac {b x}{\sqrt {1-(a+b x)^2}}\right )-2 a \tanh ^{-1}(a) \left (\log \left (1-e^{2 \tanh ^{-1}(a)-2 \tanh ^{-1}(a+b x)}\right )-\log \left (-i \sinh \left (\tanh ^{-1}(a)-\tanh ^{-1}(a+b x)\right )\right )\right )\right )-2 a b^2 x^2 \text {PolyLog}\left (2,e^{2 \tanh ^{-1}(a)-2 \tanh ^{-1}(a+b x)}\right )}{2 \left (-1+a^2\right )^2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 449, normalized size = 1.21
method | result | size |
derivativedivides | \(b^{2} \left (-\frac {\arctanh \left (b x +a \right )^{2}}{2 b^{2} x^{2}}+\frac {\arctanh \left (b x +a \right ) \ln \left (b x +a +1\right )}{2 \left (a +1\right )^{2}}+\frac {\arctanh \left (b x +a \right )}{\left (a -1\right ) \left (a +1\right ) b x}+\frac {2 \arctanh \left (b x +a \right ) a \ln \left (-b x \right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}-\frac {\arctanh \left (b x +a \right ) \ln \left (b x +a -1\right )}{2 \left (a -1\right )^{2}}-\frac {\ln \left (b x +a -1\right )^{2}}{8 \left (a -1\right )^{2}}+\frac {\dilog \left (\frac {b x}{2}+\frac {a}{2}+\frac {1}{2}\right )}{4 \left (a -1\right )^{2}}+\frac {\ln \left (b x +a -1\right ) \ln \left (\frac {b x}{2}+\frac {a}{2}+\frac {1}{2}\right )}{4 \left (a -1\right )^{2}}+\frac {\ln \left (-\frac {b x}{2}-\frac {a}{2}+\frac {1}{2}\right ) \ln \left (b x +a +1\right )}{4 \left (a +1\right )^{2}}-\frac {\ln \left (-\frac {b x}{2}-\frac {a}{2}+\frac {1}{2}\right ) \ln \left (\frac {b x}{2}+\frac {a}{2}+\frac {1}{2}\right )}{4 \left (a +1\right )^{2}}-\frac {\dilog \left (\frac {b x}{2}+\frac {a}{2}+\frac {1}{2}\right )}{4 \left (a +1\right )^{2}}-\frac {\ln \left (b x +a +1\right )^{2}}{8 \left (a +1\right )^{2}}+\frac {\ln \left (b x +a +1\right )}{\left (a -1\right ) \left (a +1\right ) \left (2 a +2\right )}+\frac {\ln \left (-b x \right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}-\frac {\ln \left (b x +a -1\right )}{\left (a -1\right ) \left (a +1\right ) \left (2 a -2\right )}+\frac {a \dilog \left (\frac {-b x -a +1}{-a +1}\right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}+\frac {a \ln \left (-b x \right ) \ln \left (\frac {-b x -a +1}{-a +1}\right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}-\frac {a \dilog \left (\frac {-b x -a -1}{-a -1}\right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}-\frac {a \ln \left (-b x \right ) \ln \left (\frac {-b x -a -1}{-a -1}\right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}\right )\) | \(449\) |
default | \(b^{2} \left (-\frac {\arctanh \left (b x +a \right )^{2}}{2 b^{2} x^{2}}+\frac {\arctanh \left (b x +a \right ) \ln \left (b x +a +1\right )}{2 \left (a +1\right )^{2}}+\frac {\arctanh \left (b x +a \right )}{\left (a -1\right ) \left (a +1\right ) b x}+\frac {2 \arctanh \left (b x +a \right ) a \ln \left (-b x \right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}-\frac {\arctanh \left (b x +a \right ) \ln \left (b x +a -1\right )}{2 \left (a -1\right )^{2}}-\frac {\ln \left (b x +a -1\right )^{2}}{8 \left (a -1\right )^{2}}+\frac {\dilog \left (\frac {b x}{2}+\frac {a}{2}+\frac {1}{2}\right )}{4 \left (a -1\right )^{2}}+\frac {\ln \left (b x +a -1\right ) \ln \left (\frac {b x}{2}+\frac {a}{2}+\frac {1}{2}\right )}{4 \left (a -1\right )^{2}}+\frac {\ln \left (-\frac {b x}{2}-\frac {a}{2}+\frac {1}{2}\right ) \ln \left (b x +a +1\right )}{4 \left (a +1\right )^{2}}-\frac {\ln \left (-\frac {b x}{2}-\frac {a}{2}+\frac {1}{2}\right ) \ln \left (\frac {b x}{2}+\frac {a}{2}+\frac {1}{2}\right )}{4 \left (a +1\right )^{2}}-\frac {\dilog \left (\frac {b x}{2}+\frac {a}{2}+\frac {1}{2}\right )}{4 \left (a +1\right )^{2}}-\frac {\ln \left (b x +a +1\right )^{2}}{8 \left (a +1\right )^{2}}+\frac {\ln \left (b x +a +1\right )}{\left (a -1\right ) \left (a +1\right ) \left (2 a +2\right )}+\frac {\ln \left (-b x \right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}-\frac {\ln \left (b x +a -1\right )}{\left (a -1\right ) \left (a +1\right ) \left (2 a -2\right )}+\frac {a \dilog \left (\frac {-b x -a +1}{-a +1}\right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}+\frac {a \ln \left (-b x \right ) \ln \left (\frac {-b x -a +1}{-a +1}\right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}-\frac {a \dilog \left (\frac {-b x -a -1}{-a -1}\right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}-\frac {a \ln \left (-b x \right ) \ln \left (\frac {-b x -a -1}{-a -1}\right )}{\left (a -1\right )^{2} \left (a +1\right )^{2}}\right )\) | \(449\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 360, normalized size = 0.97 \begin {gather*} \frac {1}{8} \, {\left (\frac {8 \, {\left (\log \left (b x + a - 1\right ) \log \left (\frac {1}{2} \, b x + \frac {1}{2} \, a + \frac {1}{2}\right ) + {\rm Li}_2\left (-\frac {1}{2} \, b x - \frac {1}{2} \, a + \frac {1}{2}\right )\right )} a}{a^{4} - 2 \, a^{2} + 1} - \frac {8 \, {\left (\log \left (\frac {b x}{a + 1} + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-\frac {b x}{a + 1}\right )\right )} a}{a^{4} - 2 \, a^{2} + 1} + \frac {8 \, {\left (\log \left (\frac {b x}{a - 1} + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-\frac {b x}{a - 1}\right )\right )} a}{a^{4} - 2 \, a^{2} + 1} - \frac {{\left (a^{2} - 2 \, a + 1\right )} \log \left (b x + a + 1\right )^{2} - 2 \, {\left (a^{2} - 2 \, a + 1\right )} \log \left (b x + a + 1\right ) \log \left (b x + a - 1\right ) + {\left (a^{2} + 2 \, a + 1\right )} \log \left (b x + a - 1\right )^{2}}{a^{4} - 2 \, a^{2} + 1} + \frac {4 \, \log \left (b x + a + 1\right )}{a^{3} + a^{2} - a - 1} - \frac {4 \, \log \left (b x + a - 1\right )}{a^{3} - a^{2} - a + 1} + \frac {8 \, \log \left (x\right )}{a^{4} - 2 \, a^{2} + 1}\right )} b^{2} + \frac {1}{2} \, {\left (\frac {4 \, a b \log \left (x\right )}{a^{4} - 2 \, a^{2} + 1} + \frac {b \log \left (b x + a + 1\right )}{a^{2} + 2 \, a + 1} - \frac {b \log \left (b x + a - 1\right )}{a^{2} - 2 \, a + 1} + \frac {2}{{\left (a^{2} - 1\right )} x}\right )} b \operatorname {artanh}\left (b x + a\right ) - \frac {\operatorname {artanh}\left (b x + a\right )^{2}}{2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {atanh}^{2}{\left (a + b x \right )}}{x^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\mathrm {atanh}\left (a+b\,x\right )}^2}{x^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________